package file;

import java.io.File;

public class DeleteDirDemo
{
    public static void main(String[] args)
    {
        File dir  = new File("a");
        if (dir.exists())
        {
            dir.delete();   // 删除目录必须为空目录，否则无法删除
            System.out.println("dir is deleted");
        }
        else
        {
            System.out.println("dir is not existed");
        }
    }
}
